home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-09-11 | 1.7 KB | 67 lines | [TEXT/MPS ] |
- *
- * Apple Macintosh Developer Technical Support
- *
- * MultiFinder-Aware Simple TextEdit Sample Application
- *
- * CPlusTESample
- *
- * TESampleGlue.a - Assembler Source
- *
- * Copyright © 1988, 1989 Apple Computer, Inc.
- * All rights reserved.
- *
- * Versions:
- * 1.10 07/89
- * 1.00 04/89
- *
- * Components:
- * CPlusTESample.make July 9, 1989
- * TApplicationCommon.h July 9, 1989
- * TApplication.h July 9, 1989
- * TDocument.h July 9, 1989
- * TECommon.h July 9, 1989
- * TESample.h July 9, 1989
- * TEDocument.h July 9, 1989
- * TApplication.cp July 9, 1989
- * TDocument.cp July 9, 1989
- * TESample.cp July 9, 1989
- * TEDocument.cp July 9, 1989
- * TESampleGlue.a July 9, 1989
- * TApplication.r July 9, 1989
- * TESample.r July 9, 1989
- *
-
- ;
- ; AsmClikLoop
- ;
- ; This routine gets called by the TextEdit Manager from TEClick.
- ; It calls the old, default click loop routine that scrolls the
- ; text, and then calls our own Pascal routine that handles
- ; tracking the scroll bars to follow along. It doesn't bother
- ; with saving registers A0 and D0, because they are trashed
- ; anyway by TextEdit.
- ;
-
- AsmClikLoop PROC EXPORT
-
- IMPORT GETOLDCLIKLOOP
- IMPORT PASCALCLIKLOOP
-
- MOVEM.L D1-D2/A1,-(SP) ; D0 and A0 need not be saved
-
- CLR.L -(SP) ; make space for procedure pointer
- JSR GETOLDCLIKLOOP ; get the old clikLoop
- MOVEA.L (SP)+,A0 ; into A0
-
- MOVEM.L (SP)+,D1-D2/A1 ; restore the world as it was
- JSR (A0) ; and execute old clikLoop
-
- MOVEM.L D1-D2/A1,-(SP) ; D0 and A0 need not be saved
- JSR PASCALCLIKLOOP ; do our clikLoop
- MOVEQ #1,D0 ; clear the zero flag so TextEdit keeps going
- MOVEM.L (SP)+,D1-D2/A1 ; restore the world as it was
- RTS
-
- END
-
-